package com.cspm.ahjy.bc.office.word.domain;

import com.cspm.ahjy.bc.office.enums.PaperSizeEnum;

public class MSPaperSize {

	private String sizeName = "默认大小";//纸张类型
	private Integer width = 0;//宽度
	private Integer height = 0;//高度
	
	public MSPaperSize(){
		
	}
	
	public MSPaperSize(String sizeName){
		this.sizeName = sizeName;
		this.width = PaperSizeEnum.getByName(sizeName).getWidth();
		this.height = PaperSizeEnum.getByName(sizeName).getHeight();
	}
	
	public Boolean equals(MSPaperSize paperSize){
		if (null == paperSize) {
			return false;
		}
		Integer width2 = paperSize.getWidth();
		Integer height2 = paperSize.getHeight();
		
		if (width.equals(width2) && height.equals(height2)) {
			return true;
		}
		return false;
	}

	public String getSizeName() {
		return sizeName;
	}

	public void setSizeName(String sizeName) {
		this.sizeName = sizeName;
	}

	public Integer getWidth() {
		return width;
	}

	public void setWidth(Integer width) {
		this.width = width;
	}

	public Integer getHeight() {
		return height;
	}

	public void setHeight(Integer height) {
		this.height = height;
	}
	
	
	
}
